(function (){
 	var selectors = {
	 dtstart: '.dtstart'
	,dtend: '.dtend' 
	,summary: '.summary'
	,vevent: '.has(.dtstart).has(.summary)'
};
jQuery.fn.mfval = function (){
	if (this[0] !== undefined){
	 var $target = jQuery(this[0]);
	 var title = $target.attr('title');
	 if ($target[0].tagName == 'ABBR' && title){
	 	return title;
	 }
	 else {
	 	return $target.text();
	 }
	}
}

jQuery.fn.dtstart = function (){
	return new Date(this.contents().andSelf().filter(selectors.dtstart).mfval());
}
jQuery.fn.summary = function (){
	return this.contents().andSelf().filter(selectors.summary).mfval()
}
jQuery.fn.dtend = function (){
	return new Date(this.contents().andSelf().filter(selectors.dtend).mfval());
}
jQuery.expr[':'].vevent = function(el){
	return jQuery(el).filter(selectors.vevent).length
}
jQuery.fn.vevent = function(mapping){
	var map =jQuery.extend({
		dstart: 'dtstart'
	,	summary:'summary'
	,	dtend:  'dtend'
	},mapping);
	
}
})()